﻿Imports System.Data
Imports System.Data.Odbc
Imports WSEntidades
Public Class actcostosFact
    Public Shared Function Build(ByVal dr As OdbcDataReader) As ActCostos
        Dim tmpActCostos As ActCostos = New ActCostos()
        Try
            With tmpActCostos
                .ClaProducto = convertDTFromDb.ConvertString(dr.Item("ClaProducto"))
                .IdEmpresa = convertDTFromDb.convertInt32(dr.Item("IdEmpresa"))
                .CostoAnt = convertDTFromDb.ConvertDecimal(dr.Item("CostoAnt"))
                .Fecha = convertDTFromDb.convertDateTime(dr.Item("Fecha"))
                .NvoCosto = convertDTFromDb.ConvertDecimal(dr.Item("NvoCosto"))
                .Periodo = convertDTFromDb.convertInt32(dr.Item("Periodo"))
                .Usr = convertDTFromDb.ConvertString(dr.Item("Usr"))

            End With
            Return tmpActCostos
        Catch ex As Exception
            Throw
        Finally
            tmpActCostos = Nothing
        End Try
    End Function
End Class
